Apple has confirmed that processors used in the iPhone 6, 7, and SE are intentionally slowed down by newer iOS updates to address aging lithium-ion batteries. The change is meant to reduce random shutdowns by throttling the phone’s CPU, but that also leads to slower performance. While the slower performance might persuade some Apple users to switch over the latest iPhone, there’s a more affordable fix — simply switch out the battery.

To first identify whether your battery is ready for a change, you can check under the Battery settings. A small notice at the very top will appear if your iPhone’s battery is ready for a swap. Once you’re ready to replace the battery, you have two choices: doing it yourself and hiring someone else to do it.

Doing it yourself poses a number of risks — you void any remaining warranty, and you risk breaking your phone. But if you’d rather do it yourself, there are plenty of guides online, and the process is easier than you might imagine. It’s also slightly cheaper to DIY.

DIY

For those ready to take on this task, you should carefully read instructions clearly outlined in a number of YouTube tutorials and in this very in-depth explainer from iFixit. The process involves unscrewing the back of the phone and then gently removing two metal plates, before mildly heating up the phone with the lid back on so that the glue comes off the battery. Then, reverse the whole process to seal the new battery in.

For this method, you’ll need smartphone repair tools, which costs around $30. Some vendors on Amazon even sell iPhone battery replacement kits for this very purpose — most hover around $25.99 for an iPhone 6 battery replacement kit and $29.99 for an iPhone 7 kit.

If you do choose to do it yourself and you have a water resistant phone like the iPhone 7 or the iPhone 7 Plus, note that your phone will no longer be water resistant after you’ve opened it up.

Pay a professional

For those who would rather get someone else to replace the battery and not risk tampering with metal plates and glue, Apple offers replacements under several conditions, according to its website. If your iPhone is under warranty or you have AppleCare+ and Apple deems the battery defective, repairs are free. But random shutdowns don’t always count as defective — Apple only considers it if your phone isn’t holding enough charge. If it doesn’t qualify, you’ll have to pay a service fee of $79.

Apple is offering to replace the battery for free for a limited group of users who bought an iPhone 6S manufactured between September and October of 2015 and are experiencing random phone shutdowns. You can check your serial number to see if you’re eligible here, but you’ll the device needs to be free of water damage and screen cracks.

You can either ship in your phone for repairs or head to an Apple store. A physical store repair could either be completed in one visit or, in more complex cases, take up to three to five days, according to Apple. Shipping it in will take a bit longer, as you need to wait for Apple to send you a box to collect your iPhone. If Apple replaces your battery for you, it should continue to be water resistant.

If all this doesn’t work for you, your timeline, or your budget, there are also plenty of third-party vendors who offer repair services for iPhones in local neighborhoods. But their quality — and whether they use sealing adhesive to maintain water resistance when removing batteries of the iPhone 7 and 7 Plus — varies by vendor, so always check reviews and ask questions. Prices similarly vary from around $40 to $70 for the iPhone 6, 6s, 7, and 7 Plus.