public ListNode insertionSortList(ListNode head) {

    ListNode helper = new ListNode(0);
    ListNode curt = head;

    while (curt != null) {

      ListNode pre = helper;
      ListNode next = curt.next;

      while (pre.next != null && pre.next.val < curt.val) {
        pre = pre.next;
      }

      // swap
      curt.next = pre.next;
      pre.next = curt;
      curt = next;
    }

    return helper.next;
  }