Updated the comments to increase my understanding of the event handler