implemented mouse events and added temporary realization of click handling on the buttons