added CodeGenerator class.