Change if-else to switches.