adapted to new API
Merge pull request #10 from dikr/master

adapted to new API