working in createPlot api