Branching logic in variables