refactor get events
call revert function when event update fails