added extension support to c++ class