add function g() in CFoo