Get rid of deque--should have been using FIFO queue