# Highest Scoring Word algorithm throwing quirky error

I’m doing a challenge on CodeWars and I’m getting a quirky error. This is the problem statement:

Given a string of words, you need to find the highest scoring word. Each letter of a word scores points according to its position in the alphabet: a = 1, b = 2, c = 3 etc. You need to return the highest scoring word as a string. If two words score the same, return the word that appears earliest in the original string. All letters will be lowercase and all inputs will be valid.

This is the algorithm I wrote which does not work in some cases:

```public static String high(String s) {
String[] words = s.split(" ");
int[] scores = new int[words.length];

for (int j = 0; j < words.length; j++) {
for (int i = 0; i < words[j].length(); i++) {
scores[j] += (int) words[j].charAt(i);
}
}

int highestWordIndex = 0;
for (int i = 1; i < words.length; i++) {
if (scores[i] > scores[highestWordIndex]) highestWordIndex = i;
}

return words[highestWordIndex];
}
```

However, when I add a “- 96” inside the nested for-loop it works. Here’s that code:

```public static String high(String s) {
String[] words = s.split(" ");
int[] scores = new int[words.length];

for (int j = 0; j < words.length; j++) {
for (int i = 0; i < words[j].length(); i++) {
scores[j] += (int) words[j].charAt(i) - 96;
}
}

int highestWordIndex = 0;
for (int i = 1; i < words.length; i++) {
if (scores[i] > scores[highestWordIndex]) highestWordIndex = i;
}

return words[highestWordIndex];
}
```

Any idea why that’s making a difference?