refine buffer