complete updating functionality