LIBRARY and TESTS