tweaking code gen