refactor (adding PlotWindow