Implementing correct mouse action