code for thesis