defused a nasty switch statement