fixed a bug in initializing the main loop caused by a refactoring and abstracting of the code previous to the main loop, 3 was not on the correct number