refine buffer interface