added db interaction