use some C++11 magic to improve code readability