udpate function test