new code

added for loop