implementing linked list and queue, not complete