change conditional statements to switch case