first iteration of erosion