updated text parsing