To improve speed, change scatter to plot