use C++11 Range-based for loop