GATOC modified to use slope quit condition