The mechanisms associated are complicated. To own any chance of knowing them, we have to evaluate how these organs evolved. That means going back again much more than 400 million a long time, to the time nicely before dinosaurs walked the earth. Until finally this position, fertilization was effectively exterior: females expelled their eggs in to t