generic code generation continued