add get_events fn and update html