full_code for thesis project