changed idb.execute to db.execute