setNotes() now uses notes.size() rather than newNotes.size()