getting rid of gevent and adding a unit test for events