public ListNode insertionSortList_(ListNode head) {

    if (head == null) {
      return head;
    }

    ListNode outer = head.next;

    while (outer != null) {

      ListNode inner = head;

      while (inner != outer) {

        if (inner.val > outer.val) {
          // exchange values
          int temp = inner.val;
          inner.val = outer.val;
          outer.val = temp;
        }

        inner = inner.next;
      }

      outer = outer.next;
    }
    return head;
  }