working now for plotting