public static int[] sort(int[] array) {
		for (int i = 1; i < array.length; i++) {
			int temp = array[i];
			// find the insertion location and move all larger elements up
			int pos = i;
			while (pos > 0 && temp < array[pos - 1]) {
				array[pos] = array[pos - 1];
				pos--;
			}
			// insert the element
			array[pos] = temp;
		}
		return array;
	}