renamed to query-extend