adding buffer to document parser