made the eventhandler async. added documentation