handed in code for thesis