classwork for loops and better solution for last nights hw in classwork