added action for when updating event
added function to control udpating; changed init function name to insert