fix api
fix tests