refactor, simple design program for calculating coeffs