add history part and function