for now final code for thesis