simplified api and added tests
removed errors