Use a case statement instead of guards