introduce QueryResult
clean up
clean up