modify somecode for plan by SQ