refine and format