Added { } and updated probability condition