Add function to filter calendar events