add feature selection using SelectKBest(chi2) and simplify the process using the sklearn Pipeline class.