refine the files