some code about PID