coords function change