A new theory of sex