add "history" function, but also generate some bugs.