updating the XY stuff