Instead of setting a variable and returning it, just return the appropriate value in each branch