add pid when updating plans