adding improved stop condition to all auto prgms