add history
fix bugs of history