dequeue to add remove items at first position and at last position