refactoring normalization and updating use of the library