code to parse bibtex