sort quires