restructure the library