refactor(hooks): adding comments and refactoring