Aging baby boomers reluctant to wind up in nursing homes can rest a little easier knowing about a new home-care robot. Scientists in Connecticut have successfully created a pill-dispensing robot with the ability to make decisions regarding medication compliance, according to a report from CNN.

With the help of the French company Aldebaran Robotics, researchers Susan and Michael Anderson created a robot that helps humans stay compliant with their medications. For instance, if a patient decides they don’t need their scheduled painkiller, the robot knows there won’t be an adverse effect if the dose is skipped.

It respects the patient’s wishes and knows not to force the issue. Likewise, if a patient refuses the dose of insulin they must have, the robot can report this kind of noncompliance with a human that oversees it.