hw9 loops