add in PID checking.