updated to use new CBQueryResponse class