c++11 refactoring