added db updating