refactored the onMouseDown function