created notesAreEqual function