added history function
added history function