add history css and function