FINISED THE ASSIGNMENT! (sorts the list ascending and decending order)