refactoring stemmer
adding functional test