adding notes and working on the refactoring