uploaded kmeanssampler.R