Code for Naturalization Paper