add sort to the query body