use queue since list&vector iterators are weird
Merge branch 'expected'