change xyz=0 to coords_are_cartesian=False, fix distance calculation.