Improved for loops for better readability