manue handling in event loop