reworked completely the mouse, debug mode