queue sorting
Merge pull request #193 from apatel/master

queue sorting