dynamically update history table