did everything up to sorting the linked list