remove unused function, rename createNewHistory --> createHistory