Updated the reference parser
The professor updated the reference parser so I copied it to here.