modified the range for retention probability to (0,1] in the exception message