Start of the final main loop