refactoring of libraries