add a bit of history saving