improve mouse event recipe