re-arrange the events table