change got_events to boolean, and put onUpdate after