added Virginia's PID functions