doing chi square faff