Replaced the switch with fancy magic.