Update to new API
Add a test - more to come