refactored libraries