fixed manhattanDistance