refactoring of notes