main loop started