Change if statements to switch