reworking results query