Debugged and updated loop. Debugging print statements still included.