What are the three conditions necessary for natural selection to occur?