improved fitting procedure