Auto-brightness is a feature that if working perfectly you shouldn’t even notice. It makes sure your screen is exactly as bright as you want it to for every amount of surrounding light. Not all smartphones are made equal, however, and some cheaper ones lack the hardware to do that. But Samsung has figured out a way to add the feature to the less capable phones using their selfie cameras.

Usually, phones use ambient light sensors to tell what the conditions around you are and adjust the brightness of your screen accordingly, which not only improves viewing experience but also saves battery. A new feature was spotted on the Samsung Galaxy J8by Sammobile, allowing auto brightness adjustment based on the input of the phone’s front facing camera.

The way it works is by taking a picture every time the user unlocks the phone to see how bright the surrounding is. Those pictures won’t be stored anywhere, Samsung ensures us. The feature won’t be fully automatic at first, since the phone requires the user to choose the desired screen brightness for different ambient conditions before being able to adequately select the proper brightness itself. After the software has enough ambient/screen brightness pairs it will start adjusting the screen automatically after you unlock your phone.

Of course, this solution isn’t perfect since it won’t detect any changes in lighting happening while you’re using the phone and correct the brightness on the fly, but it’s still better than nothing.

There’s no information from Samsung which phones will be getting the new feature, besides the J8, but it’s likely that other recent Galaxy J models that lack ambient light sensors will receive the extra functionality as well.