The most common hallucination experienced by people with schizophrenia is hearing voices. The voices often threaten and insult the sufferer, damaging the self-esteem of people already dealing with a difficult condition.

But a new study has shown that rude virtual avatars that hurl abuse at people with schizophrenia may actually help patients overcome their own voices by confronting the symptom head on.

A study published Friday in The Lancet Psychiatry found that of 75 people who underwent “avatar therapy”—during which a therapist would use a virtual avatar to insult the patient, who then spoke back to and defied the avatar—seven people reported that they “completely stopped hearing their voices” after a three-month trial.

More than 21 million people around the world live with schizophrenia. The condition is characterized by distorted thinking and behavior and often living with “voices” from imaginary people. Common symptoms include hallucinations or delusions—holding false beliefs or suspicions, even if there is evidence to the contrary.

People with schizophrenia are often portrayed as having a split personality, but that is often not the case, according to mental health charity Mind. The condition is usually treated by a combination of mental health support, including counseling, and antipsychotic drugs.

The trial involved a patient working with a therapist to create an avatar—a digital character or personality—that represented the main voice plaguing the patient. The patient would determine the voice, character and even image of the avatar.

The patient and therapist would then work through six 50-minute sessions in which the patient and avatar would confront each other. The therapist would coach the patient from another room over the computer speakers, while also voicing the avatar.

“The whole experience changes from something that’s very frightening to something that’s much more in the person’s control,” lead author Tom Craig, a professor at King’s College London, told AFP.

After 24 weeks, however, the trial found that patients in both groups—those receiving avatar therapy and those receiving counseling—had achieved the same levels of improvement, suggesting that the therapy may need booster sessions to be effective in the long term.