play history function