added repeated iterations of main