modify generate.py for spec
toc: generating nested dfnlists