changed history function