started addEvent method to be called when 'save' button is pressed