factorization into fitResult.h