Refactoring Solution 7

Adding 2 by default and halving the time spent in the while loop