correctly format history.