adapted to new API
Merge pull request #8 from shodruky-rhyammer/master

adapted to new API