changed one of those attrociously long else if ladders to a switch.