Changed void printFrom1To1000 to be more readable, non-block