modified the buffer interface