fix typo
use c++11 looping