final version of the thesis