change API to match docs

fixes #93