// todo refactor executor and event loop