code for paper NAR