test the update function.