Multipli if statements in one

Use a switch statement.