add show history function