update to use x() and y()