code gen example