Implemented the library and the test