modified cpp/google