preliminary added user guide chapter for chi-squared and fixed calls for storing data faster