use new API instead of old one
tests and a fix
Merge pull request #5 from gosquared/v3

V3