added braces around for loop

added braces around for loop