added word/words distinction, optimized