Compacted code into switch block.