code flow gen