added db code