Added probability function