Looks like the new Snapchat gender-swap filter isn’t only good for seeing what you look like as the opposite sex. The feature helped a San Francisco college student take down a cop who was meeting young girls.

Ethan created a Tinder profile using the filtered image that made him look like a girl. An officer named Robert Davies messaged him.

“I believe he messaged me, ‘Are you down to have some fun tonight?’ and I decided to take advantage of it,” Ethan told NBC’s Bay Area affiliate.

Ethan said he told the officer he was 16 but that didn’t stop Davies. “We started texting on there, and it got a lot more explicit,” Ethan said.

Ethan said he didn’t plan to take down a cop, just anybody who was plotting on an underage girl. “I was just looking to get someone,” Ethan said. “He just happened to be a cop.”

Davies was arrested by San Jose police. He faces a charge of contacting a minor to commit a felony. He has been placed on administrative leave by the San Mateo PD, who addressed the charges in a statement.

“This alleged conduct, if true, is in no way a reflection of all that we stand for as a Department, and is an affront to the tenets of our department and our profession as a whole,” they said. “As San Mateo police officers, we have sworn an oath to serve and protect our communities. I can assure you that we remain steadfast to this commitment to serving our community with ‘Professionalism, Integrity, and Excellence.'”