Changing if elses to switch.