Code for papers