improved buffer interface