added ordering to table in history