Refactored Text sample