changed queryToNotes to queryToObjects