modify the query sort