database fix & new class: QueryResult