This if-else-if-else-if-else block might be better as a switch.