Sorting added to queries list and results list. We have added the pagination in the queries list too.