added an additional option, -NumNewPointsN, and refined the codes.