Added the functionality to select events based on their categories