small refactoring + enable c++11