Some code from my Thesis