added logging, and all the mouse events