Added a new function: setMousePosition