added libraryFactory.js