plotData implementation added