functional start for plotting