code reorder: events