added dequeue predicate and inteface for it:
Merge branch 'fixed'