update table on the main thread