Added setXY member function