sperate text part logic to a sperate class - complete work