refactored fitting with lmfit
cosmetic change