added save of history