Added printQueue function and destroyQueue function