history-rewriting helpers