use new API

fixes #8