first attempt at auto-generation of simple code