add first level sort capability to queries