complete update fanction