finished the for loops part