added code generator for class