Added sort for events