remove the event sorting code