build the library