CODE FLOW GEN