bit of refactoring to make storing notes cleaner