Changed the If/Else Statements to Switch Statements

I changed the if/else statements to a switch statements to make the code more efficient.