A company in Istanbul, Turkey, has come up with a way to help its estimated 150,000 stray animals, while also protecting the environment.

The method is brilliantly simple. Pugedon’s Smart Recycling Boxes dispense food and water in exchange for recycled plastic bottles and cans. The machine has two slots – one for plastic bottles and metal soda cans, and another for water from the bottles. As shown in the video above, when someone drops a bottle or can into the slot, the machine dispenses dry food in a food dish at the bottom, which is accessible to the animals. When water is poured into the machine, it goes straight into a water container for them.

The machine runs on solar power, and the food is paid for by the profits from the recycled bottles and cans. “My primary goal was to make people see that they don’t have to spend any money to help stray dogs. And I also wanted to show that people can do good deeds with things they would normally throw away,” the inventor of the machine, Engin Girgin, told Der Spiegel. “At the same time, of course, I know that we don’t give much priority to recycling here in Turkey. In my opinion, this has to change. So I basically killed two birds with one stone.”

The project was such a success that apparently 61 countries have expressed interest in acquiring the vending machines. India could certainly use it.