use c++11 `auto` keyword