Gregor Mendel conducted experiments breeding pea plants to discover the basic principles of heredity. He found that organisms have discrete factors (now known as genes) that determine traits, which exist in two versions (alleles). During reproduction, parents contribute one of each allele to offspring randomly. Mendel also discovered that traits are inherited independently and that dominant alleles mask recessive alleles when both are present. His work formed the basis of classical genetics and established the laws of segregation and independent assortment.