Making changes to handle the probability value