Changed the if statements to a switch statement