Example for exercise and solution to exercise for event handling added