Descending order is working

Change to use of dynamic array?