adding update functionality