use standard range-based for loop