deal with class on test data correctly