added extra process check; removed debugging