updated transcript to test for loops with ifs