added initPID function