starting to refactor
refactored text module