added two heuristic functions, manhattan is more promising (set to be default) toggle by using -h manhattan or -h hamming (your original function)