change events to onEvent - more clear that a function is being called