made a updatePosition-method and wrote in getX and getY-method