fixed sorted and reversed.