NEW YORK (AP) — BJ’s got a warm welcome from Wall Street even as it continues to be a laggard in the highly competitive warehouse club market.

Shares of BJ’s Wholesale Club Holdings Inc. rallied more than 29 percent to close Thursday at $22 as it returned to the public markets after seven years.

The company’s initial public offering priced at the top of an expected range of $15 to $17 a share.

BJ’s return comes as it’s contending with a different retail landscape than it wrestled with when it first bowed out of the public market.

Costco Wholesale Corp., which now operates about 750 locations, has continued to thrive and expand even in the age of Amazon. It has created fierce loyalty among high-income customers with its treasure hunt experience and its powerful store label brand called Kirkland. Sales at stores opened at least a year including gas rose 4.1 percent in the most recent fiscal year ended Sept. 3, 2017.

Meanwhile, Walmart’s Sam’s Club, hurt by weaker locations located in less affluent areas than Costco’s, has seen improving sales as it overhauls its merchandise and expands services. In January, it said it was closing 63 clubs, or 10 percent of its fleet, and converting some of them into e-commerce fulfillment centers. In February, Sam’s Club began offering free shipping for premium members and simplifying its membership tiers. Revenue at stores opened at least a year including gas rose 3 percent for the year ended Jan. 31.

BJ’s is also facing new rivals like online retailer Boxed, which focuses on millennials who want bulk-sized deals on items like toilet paper and peanut butter — but who can’t or won’t drive to warehouse stores. Most members order through an app and get two-day delivery, and unlike the other clubs, there’s no membership fee.

BJ’s, which has a little more than 200 stores in 16 states and about 5 million members, has been trying to make it easier for its customers to shop at its behemoth stores. It’s expanding a program that lets shoppers tally their choices on a phone app or store device as they roam the aisles. Merchandise is also now laid out in quads that display fewer items instead of aisles, making it easier for shoppers to walk around and touch the products. And it’s been improving its assortment of fresh products, driving shoppers more frequently into its stores.

In an interview with The Associated Press, BJ’s CEO Chris Baldwin said that the plan is to add three to five club houses per year. It’s carefully balancing that expansion strategy while expanding into delivery services such as its partnership with Instacart.

“The retail industry continues to innovate as it reacts to what consumers want,” he said.

In its fiscal year ended Feb. 3, BJ’s earned net income of $50.3 million. On a continuing operations basis, earnings per share rose to $3.94 from $3.45. Total revenue totaled $12.75 billion, including $258.6 million in membership fee income. Sales in stores open at least 13 months — a key metric of a retailer’s health — rose 0.8 percent. Excluding gasoline sales, they declined 0.9 percent.

Westborough, Massachusetts-based BJ’s was acquired in 2011 for $2.8 billion by CVC Capital Partners and Leonard Green & Partners, which then took BJ’s private. The buyers reportedly put BJ’s up for sale last year for more than $4 billion but got no takers.

Before going private in the fall of 2011, the retailer rejected an offer of $3 billion from Walmart, according to FactSet.

The warehouse retailer is offering 37.5 million shares and underwriters have an option to buy up to 5.6 million additional shares. It plans to use proceeds from the offering to repay debt and for general corporate purposes. The stock is listed on the New York Stock Exchange under the symbol “BJ.”