Added calculation of probability