create main loop scafforlding.