switch category and action of events