Updated according to new db design