refactoring for a number of new libraries