implement the Deque