Updated if statements to switch