add library and tests