optimize setting points number