upgraded the datastore code from db.Model to ndb.Model