fixed percolation algorithm