add cut txt function