Earth's magnetic flips triggers mass extinction