fix tests for new API
fix examples for new API