fix logic in cartesian_coordinates