starting tests on text and refactoring