Code for my thesis