added scatter plot code