Refactor, calling the loop func from main