revise codes as the google-cpp-style