added error to loop BUT NEED TO FIX! orthog set scale=T for datsst