use deque