cleaned mouse event handling