fixing issue #6
adding an event and calling it