New York CNN Business  — 

Best Buy said Thursday that it laid off 5,000 workers this month and is planning to close more stores this year as more consumers buy electronics online.

The news comes at a time when big chains face growing competition from Amazon and other sites that sell items like TVs and laptops. Fry’s Electronics said Wednesday that it would abruptly close all of its stores overnight, ending nearly four-decades in business.

Best Buy (BBY) expects 40% of its sales to come from online purchases this year, up from 19% two years ago, and the company said it needed to alter its workforce in response to this shift.

CEO Corie Barry told analysts Thursday that starting earlier this month, Best Buy had been adjusting the mix of full-time and part-time employees in stores, due to “having too many full-time and not enough part-time employees.” As a result of this reorganization, Best Buy laid off 5,000 employees, the majority of whom worked full-time. It also said it is adding approximately 2,000 new part-time positions. Best Buy has around 102,000 employees.

It is the first time Best Buy provided a specific number of job cuts, which were first reported by the Wall Street Journal.

Best Buy has been a pandemic winner. The retailer saw a surge in sales of items from laptops to kitchen appliances as more Americans worked and cooked at home. During its latest quarter ending Jan. 30, sales at stores open for at least one year increased 12.6% compared with the year prior. Best Buy expects demand to slow this year, however.

The company also said Thursday that it closed 20 of its big-box stores in each of the past two years and expects to close a higher number this year. Best Buy has 450 store leases coming up for renewal in the next three years, and Barry said “there will be higher thresholds on renewing leases as we evaluate the role each store plays.” The company has around 1,000 stores in the United States.

Best Buy also plans to use more of its in-store space to fulfill home delivery orders. The retailer is piloting new store layouts that reduce the size of sales floors and expand the space dedicated to shipping orders.