improved process detection