testing the update function