Implemented and tested update functionality.