Sex determination and sex change