The 3 code block in this `switch` block should be in their own function.