convention seems to be no curly braces if you can avoid them. Removed curly braces to match. Also small optimization so that we don't look from the beginning of the word when trying to find the end but rather look from the glyph at the point in question