history formatting