added update method in key