changed linkedlist and adding new queue