Adding code to process return switch