implement and test Deque