sortings and linked list implementations