WIP: generating code