catch events with input