added test for update function
added update function