Code to control the mosue