update working with db