Origin and function of meiosis