As many parents know, the secret to getting a child to relax can sometimes means simply handing them an iPad. Apparently, that move has a scientific basis, too. According to a small new study, giving children who were about to undergo surgery an iPads was as effective at calming them down than giving them a sedative.
In the report, which was presented at the World Congress of Anaesthesiologists in Hong Kong, researchers compared the effect of using an iPad (aapl) to taking a sedative called midazolam on children’s anxiety before anesthesia and surgery. The kids, who were between the ages of 4 and 10, were randomly assigned to either take the sedative or play with an iPad—they could play games like Angry Birds and Monster Dash—20 minutes before they were given anesthesia.
The researchers measured the children’s anxiety at several different points throughout the day of surgery, including arrival at the hospital and when they were separated from their parents. The researchers also measured the parents’ satisfaction with the child’s procedure. They found that parent and child’s anxiety levels were similar between both groups, and parents were more satisfied with the experience when their child was given an iPad.
The study authors suggest that using tablets could be a way to reduce stress before surgeries without medication.
The study size was very small with only 112 kids, but it’s not the first to suggest that distraction through technology could play a role in improved medical experiences. As TIME recently reported, some hospitals and pain clinics are embracing virtual reality as a way to lower pain by distracting people with animations and virtual worlds.
Get Data Sheet, Fortune’s technology newsletter
Though the method is still being explored, researchers suggest that people can only focus on a couple things at a time, and that distracting them can take their mind away from the anxiety-inducing procedure at hand.
This story originally appeared on Time.com.