handling multiple events