upgraded to latest binding API

also added tests