Use switch statement instead of if statements