Implemented the mouse device