Abstracted functions from the switch