update for new db structure