Milestone 20: registering and unregistering events