simple proto-based event handler, wait events and do task