some modification to make c++11 more smoothly