update assert out of pid function