Having trouble with looping statement syntax...