commented out old function, changed genreics to chi-bin-tests