See More: I Asked ChatGPT When I’ll Be Able To Retire Based on My Current Finances — Here’s What It Said

View Next: I Asked ChatGPT What Trump’s ‘Big Beautiful Bill’ Means for Retirees’ Taxes — Here’s What It Said

Ken Bosma / Wikimedia Commons Ken Bosma / Wikimedia Commons

% of population 65+: 79.8%

Annual cost of living: $38,821

Average annual Social Security benefits: $28,087

Average annual retirement income: $37,858

Average annual mortgage: $18,413

Livability: 66

Green Valley has an affordable cost of living nearly equal to its average annual retirement income, and boasts a warm climate without messy seasonal shifts. Further, 68% of the homes there receive retirement income, and 84% receive Social Security benefits.

For You: 50 Cheapest Places To Retire Across America

Wildnerdpix / Shutterstock.com Wildnerdpix / Shutterstock.com

% of population 65+: 59.9%

Annual cost of living: $39,149

Average annual Social Security benefits: $29,157

Average annual retirement income: $38,032

Average annual mortgage: $18,035

Livability: 66

Retirement-age citizens make up more than half the population of Hot Springs Village, where 73% of homes are receiving Social Security benefits and retirement income goes to 63% of the households.

Wirestock / iStock.com Wirestock / iStock.com

% of population 65+: 62.4%

Annual cost of living: $41,682

Average annual Social Security benefits: $28,504

Average annual retirement income: $39,295

Average annual mortgage: $18,701

Livability: 77

In Sun City Center, a whopping 72% of homes receive Social Security benefits. As far as retirement income goes, 63% receive it. Additionally, Sun City Center is also the first of 26 Florida locations in the 50 most affordable cities for middle-class retirees.

% of population 65+: 27.7%

Annual cost of living: $32,686

Average annual Social Security benefits: $26,076

Average annual retirement income: $25,912

Average annual mortgage: $12,736

Livability: 72

Hermitage has a rather small retirement population, with only 41% of households there receiving Social Security benefits and just 33% of homes receiving retirement benefits.

Alex Potemkin / iStock.com Alex Potemkin / iStock.com

% of population 65+: 25.8%

Annual cost of living: $33,835

Average annual Social Security benefits: $29,198

Average annual retirement income: $36,334

Average annual mortgage: $12,664

Livability: 64

A relatively slim 39% of homes in Godfrey receive Social Security benefits. Similarly, only 35% of homes earn retirement income. The town has a spartan, low-key and suburban feel perfectly suited for low-key retired living.

Badger13 / Shutterstock.com Badger13 / Shutterstock.com

% of population 65+: 74.9%

Annual cost of living: $41,333

Average annual Social Security benefits: $25,938

Average annual retirement income: $27,905

Average annual mortgage: $19,207

Livability: 71

Seniors over the age of 65 make up three-quarters of Sun City’s population, making it a retirement haven in The Copper State. That’s why 63% of the households there receive retirement income, and 84% receive Social Security benefits.

Discover More: 25 Cities Where You Can Retire in Great Weather for $2,000 a Month

Michael Warren / Getty Images/iStockphoto Michael Warren / Getty Images/iStockphoto

% of population 65+: 85.2%

Annual cost of living: $45,203

Average annual Social Security benefits: $31,881

Average annual retirement income: $47,355

Average annual mortgage: $23,703

Livability: 70

Florida has long been known as a prime location for retirees to settle down, so it should come as no surprise that a staggering 90% of households in The Villages receive Social Security benefits, and 77% receive retirement income.

©Zillow ©Zillow

% of population 65+: 42.6%

Annual cost of living: $39,700

Average annual Social Security benefits: $30,557

Average annual retirement income: $44,387

Average annual mortgage: $18,504

Livability: 69

Roughly half of the households in Florida’s centrally located Wildwood receive some form of retirement aid — 55% Social Security and 49% retirement income. While Wildwood might be landlocked, it offers lake access and numerous golf courses for residents.

Denton Rumsey / Shutterstock.com Denton Rumsey / Shutterstock.com

% of population 65+: 28.7%

Annual cost of living: $36,968

Average annual Social Security benefits: $28,325

Average annual retirement income: $38,439

Average annual mortgage: $15,691

Livability: 68

Aiken is the only South Carolina town on this list. Less than 30% of the population is of retirement age; 47% of households receive Social Security and 36% receive retirement income.

Jim Schwabel / Shutterstock.com Jim Schwabel / Shutterstock.com

% of population 65+: 59.4%

Annual cost of living: $42,021

Average annual Social Security benefits: $27,195

Average annual retirement income: $41,086

Average annual mortgage: $19,924

Livability: 72

Englewood offers a wealth of outdoor recreational activities, making it an attractive retirement community. That’s likely why seniors have flocked there, with more than half the population consisting of people age 65 and over. About 69% of homes receive Social Security benefits, and 55% receive retirement income.

Ebyabe / Wikimedia Commons Ebyabe / Wikimedia Commons

% of population 65+: 47.2%

Annual cost of living: $41,232

Average annual Social Security benefits: $25,722

Average annual retirement income: $29,540

Average annual mortgage: $17,236

Livability: 74

Roughly half of North Fort Myers’ population is of retirement age, which is why 45% of homes receive retirement income. Concurrent to that, 62% of households have Social Security benefits coming in.

Explore Next: 21 Affordable Small Cities To Retire on the East Coast

fotoguy22 / Getty Images/iStockphoto fotoguy22 / Getty Images/iStockphoto

% of population 65+: 25.8%

Annual cost of living: $36,591

Average annual Social Security benefits: $24,705

Average annual retirement income: $27,905

Average annual mortgage: $16,903

Livability: 83

Folks who are of retirement age make up a quarter of Middleburg Heights’ population; 36% of homes receive retirement income, while 37% receive Social Security.

halbergman / Getty Images/iStockphoto halbergman / Getty Images/iStockphoto

% of population 65+: 85.8%

Annual cost of living: $45,199

Average annual Social Security benefits: $29,237

Average annual retirement income: $37,055

Average annual mortgage: $23,118

Livability: 62

Sun City West’s population is overwhelmingly of retirement age — nearly 86%, in fact. In keeping with that percentage, 86% of homes receive Social Security, and 74% receive retirement income.

Photoladybug / Getty Images/iStockphoto Photoladybug / Getty Images/iStockphoto

% of population 65+: 33.1%

Annual cost of living: $37,387

Average annual Social Security benefits: $25,288

Average annual retirement income: $28,366

Average annual mortgage: $16,687

Livability: 64

The coastal city of Port Charlotte is a perfect place to settle down, thanks to its affordable living and lovely views. Despite that, only 33% of the population is over the age of 65, with 39% of homes receiving retirement income and 56% receiving Social Security benefits.

Vito Palmisano / Getty Images/iStockphoto Vito Palmisano / Getty Images/iStockphoto

% of population 65+: 53.5%

Annual cost of living: $43,111

Average annual Social Security benefits: $30,518

Average annual retirement income: $41,595

Average annual mortgage: $21,934

Livability: 76

Punta Gorda is an attractive destination for retirees thanks to its affordable prices and waterfront properties. About 53% of the households receive retirement income, and 64% of homes have Social Security benefits rolling in.

Sergey-AND-Marina / Getty Images/iStockphoto Sergey-AND-Marina / Getty Images/iStockphoto

% of population 65+: 27.0%

Annual cost of living: $36,712

Average annual Social Security benefits: $24,905

Average annual retirement income: $32,452

Average annual mortgage: $14,747

Livability: 65

The retiree population in Lake Wales is fairly low, and just 30% of homes live on retirement income and 45% take Social Security benefits.

Also Discover: America’s 30 Safest and Wealthiest Retirement Towns

halbergman / iStock.com halbergman / iStock.com

% of population 65+: 25.4%

Annual cost of living: $36,526

Average annual Social Security benefits: $23,037

Average annual retirement income: $34,143

Average annual mortgage: $17,039

Livability: 84

Despite being a retirement-friendly community for the middle class, only one-quarter of its population is over 65, with 37% of homes receiving Social Security benefits and 29% receiving other retirement income.

% of population 65+: 25.1%

Annual cost of living: $39,254

Average annual Social Security benefits: $23,227

Average annual retirement income: $29,126

Average annual mortgage: $16,165

Livability: 80

One of six Arizona cities in the top 50, Kingmans’ toasty climate is perfect for settling down for your golden years. About 33% of the homes live off retirement income, and 43% receive Social Security benefits.

Jim Schwabel / Shutterstock.com Jim Schwabel / Shutterstock.com

% of population 65+: 59.9%

Annual cost of living: $46,808

Average annual Social Security benefits: $28,604

Average annual retirement income: $81,011

Average annual mortgage: $24,534

Livability: 79

Close to the Gulf of Mexico and blessed with a lovely climate, Venice is a perfect place for middle-class retirees to settle down. Nearly 60% of its population is over 65, with 55% of Venice households receiving retirement income and 70% accepting Social Security benefits. The $81,011 average retirement income is the highest among these 50 cities.

Mishella / Getty Images/iStockphoto Mishella / Getty Images/iStockphoto

% of population 65+: 27.3%

Annual cost of living: $40,536

Average annual Social Security benefits: $27,154

Average annual retirement income: $36,390

Average annual mortgage: $18,363

Livability: 76

North Port is a fast-growing town with affordable housing and plenty of outdoor activities for active middle-class retirees. Currently, 49% of the homes are receiving Social Security benefits, and about 38% are on retirement income.

Jillian Cain Photography / Shutterstock.com Jillian Cain Photography / Shutterstock.com

% of population 65+: 38.0%

Annual cost of living: $41,784

Average annual Social Security benefits: $25,278

Average annual retirement income: $46,259

Average annual mortgage: $19,249

Livability: 76

This lakeside locale provides middle-class retirees with beautiful scenery and outdoor activities for a relaxing retirement. While about 38% of the homes there receive retirement income, 57% of them receive Social Security benefits.

Check Out: What It Takes To Be Upper Class in America Plus 10 Safest Retirement Towns for Upper Class

©iStock.com ©iStock.com

% of population 65+: 33.0%

Annual cost of living: $39,403

Average annual Social Security benefits: $24,440

Average annual retirement income: $31,766

Average annual mortgage: $17,402

Livability: 72

Known as “The Hospitality City,” Edgewater has a suburban, small-town vibe for potential retirees looking to avoid the big-city hustle and bustle. Of the overall population, 51% of homes receive Social Security benefits and 35% receive retirement income.

Ken Badgley / Getty Images/iStockphoto Ken Badgley / Getty Images/iStockphoto

% of population 65+: 52.4%

Annual cost of living: $42,771

Average annual Social Security benefits: $26,661

Average annual retirement income: $29,507

Average annual mortgage: $20,296

Livability: 70

Lady Lake is known for low housing costs and low crime rates, making it a safe and affordable home for middle-class folks ready for retirement. More than half the population is over retirement age, with 44% of households receiving retirement income and 69% accepting Social Security benefits.

©Shutterstock.com ©Shutterstock.com

% of population 65+: 35.8%

Annual cost of living: $42,759

Average annual Social Security benefits: $23,900

Average annual retirement income: $35,786

Average annual mortgage: $20,618

Livability: 83

Sebastian has a small-town tropical atmosphere that’s perfect for a retiree’s golden years. Nearly half of the households there receive retirement benefits of some sort — 53% accept Social Security benefits and 43% receive retirement income.

Ken Badgley / Getty Images/iStockphoto Ken Badgley / Getty Images/iStockphoto

% of population 65+: 28.9%

Annual cost of living: $38,567

Average annual Social Security benefits: $23,621

Average annual retirement income: $30,042

Average annual mortgage: $16,926

Livability: 64

Exactly 50% of the households in Leesburg receive Social Security benefits — despite less than 30% of the population being over 65 –and 32% receive retirement benefits.

DeborahMaxemow / Getty Images DeborahMaxemow / Getty Images

% of population 65+: 32.7%

Annual cost of living: $40,593

Average annual Social Security benefits: $22,429

Average annual retirement income: $24,367

Average annual mortgage: $18,245

Livability: 73

Low-cost housing, warm weather, beautiful views — Zephyrhills has everything a middle-class retiree might want. Retirement benefits go to 34% of the homes in Zephyrhills, with Social Security benefits flowing into 54%.

Find Out: How Long $2 Million in Retirement Will Last in Every State

Allard1 / Getty Images/iStockphoto Allard1 / Getty Images/iStockphoto

% of population 65+: 32.5%

Annual cost of living: $40,298

Average annual Social Security benefits: $26,900

Average annual retirement income: $34,877

Average annual mortgage: $18,637

Livability: 61

Alabama does not tax Social Security benefits, which makes the affordable town of Foley all the more attractive to middle-class retirees. Nearly half the households there — 49.5% — received Social Security benefits that are not taxed by the state, and 38% receive other retirement income.

Dan Perry / Flickr.com Dan Perry / Flickr.com

% of population 65+: 45.0%

Annual cost of living: $45,558

Average annual Social Security benefits: $28,698

Average annual retirement income: $40,184

Average annual mortgage: $24,225

Livability: 77

One of two towns from The Silver State in the top 50, nearly half of Mesquite is made up of retirement-age seniors, and 49% receive retirement income. A somewhat larger number of households — 65% — get Social Security benefits.

Michael Warren / Getty Images/iStockphoto Michael Warren / Getty Images/iStockphoto

% of population 65+: 29.9%

Annual cost of living: $42,536

Average annual Social Security benefits: $26,782

Average annual retirement income: $35,847

Average annual mortgage: $20,312

Livability: 69

Thanks to low housing costs and Florida’s homestead exemption and no state taxes, Palm Coast creates a financially comfortable haven for middle-class retirees. About 50% of the homes receive Social Security benefits, and 41% receive other retirement income.

Erik Daniel Drost / Flickr.com Erik Daniel Drost / Flickr.com

% of population 65+: 29.9%

Annual cost of living: $43,410

Average annual Social Security benefits: $30,079

Average annual retirement income: $33,786

Average annual mortgage: $22,005

Livability: 73

Murrysville is the second (and last) Pennsylvania town to appear in the 50 best towns for middle-class retirement, and it offers a small-town suburban feel while also providing big-city amenities thanks to its close proximity to Pittsburgh. Of Murrysville’s overall population, 48.5% receive Social Security and 41% receive retirement income.

benedek / Getty Images/iStockphoto benedek / Getty Images/iStockphoto

% of population 65+: 28.9%

Annual cost of living: $40,984

Average annual Social Security benefits: $20,883

Average annual retirement income: $17,859

Average annual mortgage: $18,435

Livability: 80

Close to the coast and to the Tampa-St. Petersburg-Clearwater metro area, New Port Richey is essentially a poster city for Florida retirement. However, only 29% of the households there receive retirement income, while 48% receive Social Security benefits.

Also Find: How Much You Need To Earn To Be Upper Middle Class in Every State

4kodiak / Getty Images 4kodiak / Getty Images

% of population 65+: 32.2%

Annual cost of living: $41,609

Average annual Social Security benefits: $23,452

Average annual retirement income: $26,195

Average annual mortgage: $18,404

Livability: 64

While not nearly as often as Florida, Arizona pops up frequently in the top 50 due to its dry, warm weather and overall suburban vibes. There’s a sharp gap between household benefits in Bullhead: While 54% of households receive Social Security benefits, only 35% make other retirement income.

shuttersv / Shutterstock.com shuttersv / Shutterstock.com

% of population 65+: 31.9%

Annual cost of living: $42,017

Average annual Social Security benefits: $29,402

Average annual retirement income: $33,688

Average annual mortgage: $21,042

Livability: 65

Bella Vista is a small Ozarks community that provides active seniors with plenty of outdoor activities, such as numerous golf courses, nature and biking trails, lakes and parks. The percentage of households in Bella Vista receiving retirement income stands at 39%, and 47% get Social Security benefits.

Purdue9394 / Getty Images Purdue9394 / Getty Images

% of population 65+: 27.5

Annual cost of living: $43,170

Average annual Social Security benefits: $27,728

Average annual retirement income: $36,603

Average annual mortgage: $21,011

Livability: 79

There’s a gap of about 10% in Westchester between the households receiving Social Security benefits (42%) and retirement income (32%). A western suburb of Chicago, Westchester provides quiet small-town living (with numerous parks and trails) along with close access to The Windy City.

travelview / Getty Images travelview / Getty Images

% of population 65+: 28.1%

Annual cost of living: $41,447

Average annual Social Security benefits: $23,632

Average annual retirement income: $29,190

Average annual mortgage: $21,077

Livability: 81

The first of two Texas appearances in the top 50, Kerrville resides along the Guadalupe River and hosts a thriving arts and tourism scene — a fine mix of culture and community. It’s a place most middle-class retirees would likely be happy to call home; of those homes, 31% receive retirement income and 43% have Social Security benefits coming in.

Steve Hedin / Wikimedia Commons Steve Hedin / Wikimedia Commons

% of population 65+: 32.0%

Annual cost of living: $43,663

Average annual Social Security benefits: $24,255

Average annual retirement income: $32,487

Average annual mortgage: $21,864

Livability: 68

Pahrump, despite its rural location nearly an hour from Las Vegas, features plenty to do: a winery, access to national parks and warm desert weather for a number of outdoor activities. While only 32% of its population is of retirement age, 42% receive retirement income, and 58% get Social Security benefits.

See This: How Long $1 Million in Retirement Will Last in Every State

PhotoYoshi / Getty Images/iStockphoto PhotoYoshi / Getty Images/iStockphoto

% of population 65+: 33.3%

Annual cost of living: $44,212

Average annual Social Security benefits: $23,979

Average annual retirement income: $32,115

Average annual mortgage: $22,382

Livability: 83

State parks, cultural centers, lovely weather, affordable housing — Ormond Beach provides a rich life for middle-class retirees. Over half (53%) of the households there receive Social Security benefits, and 34% receive retirement income of some sort.

felixmizioznikov / Getty Images felixmizioznikov / Getty Images

% of population 65+: 28.4%

Annual cost of living: $43,861

Average annual Social Security benefits: $27,490

Average annual retirement income: $42,098

Average annual mortgage: $22,344

Livability: 79

Vero Beach lives up to its name — there are miles of beaches for a middle-class retiree to relax. The town also boasts botanical gardens, museums and that gorgeous Florida weather that is so inviting to those who want retirement to feel like a prolonged vacation. Currently, 31% of homes receive retirement income, and 44% receive Social Security benefits.

Richard McGuirk / Getty Images/iStockphoto Richard McGuirk / Getty Images/iStockphoto

% of population 65+: 27.6%

Annual cost of living: $45,297

Average annual Social Security benefits: $30,157

Average annual retirement income: $40,363

Average annual mortgage: $22,273

Livability: 66

While Leland’s retirement-age community comprises just 28% of its population, 45% of its households receive retirement income (and 44% receive Social Security benefits). Middle-class retirees looking for physical activity will find plenty to do in Leland, which offers beaches, fishing and numerous golf courses.

Murmakova / Getty Images/iStockphoto Murmakova / Getty Images/iStockphoto

% of population 65+: 25.0%

Annual cost of living: $45,126

Average annual Social Security benefits: $25,589

Average annual retirement income: $36,458

Average annual mortgage: $20,815

Livability: 76

Exactly one-quarter of Cape Coral’s population is retirement age, with 33% of its households pulling in retirement income and 44% receiving Social Security benefits. Those middle-class retirees enjoy Cape Coral’s mild winters and warm summers, as well as water activities such as boating, fishing and other watersports.

Susan Rydberg / Getty Images/iStockphoto Susan Rydberg / Getty Images/iStockphoto

% of population 65+: 33.1%

Annual cost of living: $46,316

Average annual Social Security benefits: $29,908

Average annual retirement income: $33,204

Average annual mortgage: $23,479

Livability: 75

Mount Dora is known for its numerous festivals and vibrant arts scene, providing its retirement community (33% of its population) with plenty to do and celebrate throughout the year. About 40% of retired people have their own income, on top of the 49% who take advantage of Social Security benefits.

Also Know: How Far $750K Plus Social Security Goes in Retirement in Every US Region

nwinter / Getty Images/iStockphoto nwinter / Getty Images/iStockphoto

% of population 65+: 33.7%

Annual cost of living: $43,783

Average annual Social Security benefits: $24,689

Average annual retirement income: $28,974

Average annual mortgage: $22,176

Livability: 67

Resting at the base of the Superstition Mountains, Apache Junction offers stunning desert views to its residents. The town also has several walking and hiking trails for those looking for activity and old-school gunfight reenactments for those looking for entertainment. Of its population, 39% receive retirement income and 52% receive Social Security benefits.

Mikereichold / Wikimedia Commons Mikereichold / Wikimedia Commons

% of population 65+: 26.8%

Annual cost of living: $44,415

Average annual Social Security benefits: $21,510

Average annual retirement income: $26,288

Average annual mortgage: $21,674

Livability: 81

Largo — separate from the island Key Largo — provides its residents with affordable living, great weather, suburban culture and acres of botanical gardens. Basically all of the retired households have income (29%) outside of Social Security, which is paid to 42% of residents.

RoschetzkyIstockPhoto / Getty Images/iStockphoto RoschetzkyIstockPhoto / Getty Images/iStockphoto

% of population 65+: 28.2%

Annual cost of living: $48,122

Average annual Social Security benefits: $28,887

Average annual retirement income: $46,288

Average annual mortgage: $25,509

Livability: 83

Thanks to Georgetown’s proximity to Austin, residents have easy access to big-city culture but can come home to smaller-town living. Of those homes, 37% bring in retirement income, and 44% receive Social Security benefits.

Mshake / Getty Images/iStockphoto Mshake / Getty Images/iStockphoto

% of population 65+: 29.6%

Annual cost of living: $45,797

Average annual Social Security benefits: $26,618

Average annual retirement income: $35,003

Average annual mortgage: $25,144

Livability: 84

Ohio makes its lone appearance in the top 50 right at the end with Centerville, which features a number of large senior communities within its city limits. Within those communities, 36% of the households earn retirement income, and 39% receive Social Security benefits.

Sean Pavone / Getty Images/iStockphoto Sean Pavone / Getty Images/iStockphoto

% of population 65+: 32.2%

Annual cost of living: $47,861

Average annual Social Security benefits: $24,165

Average annual retirement income: $33,189

Average annual mortgage: $25,066

Livability: 89

Seminole sits on Long Bayou, just northwest of St. Petersburg. It is the fourth most expensive city on this list. About 45% of people get paid Social Security benefits, and 38% pull other income in retirement as well.

Read More: Here’s the Cost of Living in Every State

RSchulenburg / Wikimedia Commons RSchulenburg / Wikimedia Commons

% of population 65+: 35.1%

Annual cost of living: $48,184

Average annual Social Security benefits: $25,188

Average annual retirement income: $33,918

Average annual mortgage: $24,926

Livability: 74

The Village of Huntley, an affluent suburb of Chicago, is the most expensive city on this list. About 52% of households are on Social Security and 44% make added retirement income.

csfotoimages / Getty Images csfotoimages / Getty Images

% of population 65+: 26.9%

Annual cost of living: $46,138

Average annual Social Security benefits: $23,658

Average annual retirement income: $34,358

Average annual mortgage: $24,121

Livability: 82

Bradenton — home to the Bishop Museum of Science and Nature — sits on the Manatee River, south of Tampa and north of Sarasota. Its livability score ranks 10th among the cities on this list. About 44% of people qualify for Social Security payouts, and 30% (essentially all of the retired residents) have income beyond Social Security.

Jon Bilous / Shutterstock.com Jon Bilous / Shutterstock.com

% of population 65+: 35.3%

Annual cost of living: $48,053

Average annual Social Security benefits: $25,771

Average annual retirement income: $38,358

Average annual mortgage: $26,008

Livability: 70

About half the households in New Smyrna Beach receive Social Security, and pretty much all of the retirement-age residents (39%) have their own income sources. The cost of living here is in the top three among the cities on this list.

Methodology: To qualify for this study, each city had to have a population of at least 15,000 residents, a population aged 65 and over of at least 25% and average home values under $500,000, as well as having all data points available. GOBankingRates found qualifying cities using the U.S. Census American Community Survey. The cost of living was calculated using Sperling’s BestPlaces, Zillow Home Value Index, Federal Reserve Economic Data. The livability index was sourced from AreaVibes. The average mortgage cost was scored and weighted at 1.00, the average expenditure cost was scored and weighted at 1.00, livability was scored and weighted at 1.00, the percentage of households that receive Social Security benefits was scored and weighted at 1.00, the average Social Security benefits received per household that receives them was scored and weighted at 1.00, the percentage of households that receive retirement income was scored and weighted at 1.00, and the average retirement income received per household that receives it was scored and weighted at 1.00. All the scores were summed and sorted to show the best retirement towns for the middle class. All data is current as of Oct. 20, 2025.

More From GOBankingRates

This article originally appeared on GOBankingRates.com: 50 Best Retirement Cities for the Middle Class