finish Deque and tests