flow: shuffle case statement handling around