Add stophistory function.