Update of do-file 4 +slope calculation

do file 4 is complete