Code for paper