Debugging more with loop and displaying data