The code for my masters research project