update pi simultaneously (hope this is correct)