Commented code to get event types