added probability check