Sex change as an alternative life-history style