added history func