changes for new api, not tested
bug fixes, version 1.0.9