renamed npoints -> n_points to keep our variables consisten