first draft of auto-bib detection