update history & rebuild