an insertion sort in swift