Added scope for loop