adjusted file to new db structure