added tests + refactor (extracted word)