cleaned up pagination format and events ordering