internalized write_bib