refine the txt