deque changes and tests