added control for number of points in example 5.3