passing events to getNextEvent