debugging script, still a problem in inflection point estimation