fixed SGPLOT
changed order of analysis
remove data.dir