resolve the probability logic