changed comparison mechanism for events