add second for loop

fix the problem that if a point is a sink it won’t be added to the dic