add a function f in CFoo