implem for dequeue