extending sorting in QueryHelper