modify for ndb