Snapchat has incorporated a phone number opt-out feature into its mobile app in response to a recent hacking incident -- the company's latest effort to convince users that their personal information is safe.

The change was made partially to address a data breach last week in which hackers made off with the usernames and phone numbers of more than 4 million users. A vulnerability in Snapchat's system allowed the hackers to match phone numbers with Snapchat accounts, the attackers said at the time.

Giving Snapchat your phone number is optional, but it is designed help the app connect people by displaying the accounts of Snapchat users who match the phone numbers in people's address books. Previously, there was not a way to remove or de-link your phone number after giving it to Snapchat.

But now, given the hacking incident, Snapchat said on Thursday it was updating its app on both iOS and Android to include a way for users to opt out of linking their phone number with their username, if they have already given the number to Snapchat. The company did not say, however, that it would delete users' phone numbers from its databases if users subsequently elect to opt out.

The change, to be clear, simply gives people the option, at any time, to de-link their phone number from their username.

The update also requires new Snapchat users to verify their phone number before using the linking service, which the company calls "Find Friends."

In conjunction with the software update, Snapchat also issued an overdue apology for last week's data breach.

"We are sorry for any problems this issue may have caused you and we really appreciate your patience in support," the company said in a blog post. More improvements will be made down the line to prevent future attempts to abuse the company's system, Snapchat said.

Since the hack, Snapchat, which is based in Los Angeles, has been criticized for playing things a little too cool. Prior to the incident, the company characterized the initial claims describing the potential for a hack as being theoretical.

Last week, the company said it would be letting people opt out of the compromised feature, asking security experts to contact them when they discover vulnerabilities in its system, though the company stopped short of an actual apology.