update ChiSquare definition to manage params better