add history recording