added db for notes, note lookup, and adding matches to message object