Sex allocation, sex ratios and reproduction