Defense Secretary Ash Carter announced Thursday that female service members will now get a standard 12 weeks of paid maternity leave, doubling the time now allowed for women in the Army and Air Force but slashing six weeks from servicewomen in the Navy and Marines.

The changes are part of the “Force of the Future” initiative aimed at helping recruitment and retention rates by making it easier for service members to have families. Tied in with Carter’s December announcement opening all front-line combat positions to women, the military of the future is looking increasingly more gender-balanced.

Paid paternity leave for fathers will also increase from 10 days to two weeks.

Carter said that the decision to make the standard 12 weeks rather than the 18 previously allotted to Navy members and Marines was partly to keep from losing an edge.

“Twelve weeks is extremely generous by any standard,” Carter said. “It puts us in the top tier of employers. But you have to balance readiness costs. I thought it was important we have the same standard across the force.”

Further, the Department of Defense will now pay for egg and sperm freezing for active duty service members, as well as requiring a designated nursing mother’s room at any facility with more than 50 women.

The difficulty of balancing family with the demands of the military is one of the leading issues with retaining soldiers, and Carter admitted the system was in dire need of an upgrade, admitting that previous child care programs and benefits were suited to “the needs of a different era.”

Nearly half of all enlisted families require an alternative child care provider outside the military because of lack of access or hours, and there’s a direct correlation between dissatisfaction in child care and difficulties in retaining people. Women at peak ages for starting families statistically leave the military at higher rates, and overall are retained at a rate 30 percent lower than men across the service.

Secretary of the U.S. Air Force Deborah Lee James applauded the move on Twitter, calling it “the right thing to do.”

Navy Secretary Ray Mabus, who tripled maternity leave for his branch in August and who now has a lot of service women losing time, kept his opinions to himself.