refactoring: parseChars etc