working on code gen