event system done, next up: main loop