Running version of single.r and added plot.r