scope for loops