added a function to find the mass of the percolation cluster