Modifying the distance