converted to lib, added basic tests