added functionality to sort from warmest to coldest - used quicksort algorithm