added ability to handle several events in one method