Improved the for loop, only data can be put inside for loops