make event loop an attr