final version for the thesis