adjusted things for new db structure