finished the history implementation