First part of a working implementation for loop. Refactoring to make the handleRequest method work when called as a promise