rewrite historyAction