Twitter, facing slowing user growth, said it will lay off up to 336 employees, or about 8% of its global workforce.

The company, in an SEC filing Tuesday, said it expects to incur a $10 million to $20 million cash charge for severance costs associated with the layoffs. Twitter said it expects to recognize most of the pre-tax restructuring charges in the fourth quarter.

The layoffs come one week after Twitter named co-founder Jack Dorsey permanent CEO, launched curated-news feature Mentions and also announced the opening of its Amplify video-ad program to all creators.

According to Dorsey, the job cuts will most heavily affect Twitter’s product and engineering teams. The job cuts will put the company on “a stronger path to grow,” he wrote in an email memo Tuesday to employees which the company appended to its SEC filing.

“We feel strongly that Engineering will move much faster with a smaller and nimbler team, while remaining the biggest percentage of our workforce. And the rest of the organization will be streamlined in parallel,” Dorsey wrote.

The CEO added, “This isn’t easy. But it is right. The world needs a strong Twitter, and this is another step to get there.”

In the filing, Twitter updated guidance for the third quarter of 2015. The company expects revenue to be at or above the high end of the previously forecast range of $545 million to $560 million, with adjusted earnings at the top end of the $110 million to $115 million range.

Twitter is scheduled to report Q3 2015 earnings on Tuesday, Oct. 27, after market close.