Added code for update event stuff