has been collecting and storing detailed calling and text messaging records from some of its users for years, the company admitted over the weekend. The data was collected on an opt-in basis, but the breath of information retained further adds to the privacy backlash the company is currently facing.

First reports about Facebook collecting this data surfaced last week, when some users made use of a Facebook feature that allows them to download all of their data from the company’s servers. Some users found that these records included detailed records about phone calls they made in the past, including numbers called, as well as date, time and duration of each and every call.

Downloaded my facebook data as a ZIP file Somehow it has my entire call history with my partner's mum pic.twitter.com/CIRUguf4vD — Dylan McKay (@dylanmckaynz) March 21, 2018

Facebook admitted Sunday that it has in fact been collecting this type of data, but painted it as a way for the company to improve its service. “This helps you find and stay connected with the people you care about, and provides you with a better experience across Facebook,” the company said in a blog post. ” This feature does not collect the content of your calls or text messages. Your information is securely stored and we do not sell this information to third parties.”

It also clarified that this type of data has only been collected from some users, specifically those who have used Facebook Messenger or Facebook Lite on Android, and also opted into the continuous upload of phone contact, text and call information.

Facebook first added this option to the Android Messenger app in 2015, and subsequently also to the Facebook Lite app. On Monday, Facebook also detailed how users can opt out of sharing this type of information if they previously allowed the company to access it.

The disclosure comes as Facebook is already under scrutiny for its role in the Cambridge Analytica scandal. The Trump-linked data company was able to access the personal data from as many as 50 million Facebook users in 2014, and subsequently may have used that data to target users with political messaging. On Monday, news broke that the FTC has opened up an investigation into Facebook’s handling of its users data.