moved THIN_PID variable to appropriate location