switch list to deque