added stemmer and statistics calculation