final version for thesis