New fitting algorithm for long pathes.