Implemented dequeue