generalized the event mode using an enumeration