test program for chi squared