new plot and R codes added