code for the PID comparison added