fixed the quicksort, added some testing code for nearest neighbor interp