to review code for reset mouse handling