changed variable typo
changed text processing