Added conditional statements to randomly select facts