added update functionality