used a while loop instead of tail recursion to build event list BECAUSE PYTHON CAN'T DEAL WITH MY FUNCTIONAL PARADIGMS