getSamplePoints method modified