cleaned main loop from debug output