linked list is now sorted.