When it comes to saving for college, you don’t always have to remain in-state.

Families poured cash into the 529 college savings plans in the first half of 2018, according to recent data from the College Savings Plan Network.

These tax-advantaged accounts allow families to sock away after-tax dollars and have them accumulate earnings free of federal income taxes. As long as you take the money out to pay for qualified education expenses, you can do so tax-free.

Savers invested close to $330 billion in these plans, boosting the average plan balance to an all-time high of $24,153, the College Savings Plan Network found.

“People are getting more serious about saving,” said James DiUlio, chair of the College Savings Plan Network. “Young parents with college loans don’t want that to happen to their kids.”

A handful of state plans were standouts, grabbing a massive share of assets.

Be aware that, while you are not restricted to investing in only your home state’s 529 plan, more than 30 states do offer some form of state tax break to residents who choose the local college savings plan, according to Savingforcollege.com.