Add support for ndb

Fixes #2