change _xpos and _ypos to float not int