Unordered algorithm enabled

queue-based method support both ordered and unordered algorithm