fixing the percolation class