modify for loop clause in the manner of C++11