fixing rubocop offense on array of words