better mouse handling