can anyone give the algorithm of hm2007 based on which it works?