changed QueryResult implementation