pid handling