MSc final project code