all code copied to suite the new db.