editing reference and citations extraction code