note refactoring