Added documentation for the update method.