managing mouse click events and behaviours