Updates the history