resolved a mistake in the manhattan distance's implementation