unfinished db.cc