Replaced switch statements with if statements.
oops