Added update functionality.