add gencode to subscript