update history info; update pi