Sorting an array of integers. not totally complete