refactoring library