added db struct