load main and bib