Change find next point algithm

Change find next point algithm