Added deque, testing needed.