Code refactoring - 110307.cpp (c++11)