Restore previous switch statement now that its logic is isolated