remove dependency on chi-square of Apache Math