noteId should not be global