This would be a tidier as a switch block.