public static ListNode reverseBetween_Bad(ListNode head, int m, int n) {

    // first step is to find the m-th and n-th node
    ListNode mNode = null;
    ListNode mPrev = null;
    ListNode nNode = null;
    ListNode nNext = null;

    ListNode curt = head;
    ListNode prev = null;
    int count = 1;
    while (curt != null) {
      if (count == m) {
        mPrev = prev;
        mNode = curt;
      }
      if (count == n) {
        nNode = curt;
        nNext = curt.next;
        break;
      }
      prev = curt;
      curt = curt.next;
      count++;
    }

    // System.out.println(mNode + " " + nNode);

    // reverse between mNode and nNode
    curt = mNode;
    prev = nNext;
    ListNode next = curt.next;
    while (curt != nNode) {
      curt.next = prev;
      prev = curt;
      curt = next;
      next = next.next;
    }
    curt.next = prev;
    if (mPrev != null) { // bug, need null pointer checker
      mPrev.next = curt;
    }
    if (m == 1) {
      return nNode;
    } else {
      return head;
    }
  }