update to the new db struct