updated linked list and queue