Refactored to use Text instead of String