better main loop handling