updated fitting script (small change)