working on the pid check