changes on  M algorithm/walk_hash.pl