deleted letterToNumber and changed while-loop criteria