added in ranking command and ranking based return sort