Out of memory exception.

This problem will fix most people out of memory exception. I took a higher sample size and now it seems to work properly.