I yawn and stretch, then climb to the top of the moss pile to soak up some warmth. Next I’ll check out that spot by the water where I found those yummy bugs yesterday. It’s shaping up to be another good day.

The critter above is a Houston toad (Anaxyrus houstonensis), an endangered species of amphibian. He lives at the Houston Zoo and is part of a zoo-based breeding program called the Houston Toad Recovery Project.

There sometimes exists a public perception that zoo animals live in sterile cages and suffer unrelenting boredom or even fear. Historically, zoos were created primarily for entertainment purposes and simply prioritized keeping animals visible and habitats clean. While this does help visitors see animals and animals stay healthy, it isn’t sufficient for allowing animals to lead rich and fulfilling lives. Fortunately for both human and nonhuman animals, modern accredited zoos and aquariums like the Houston Zoo hold themselves to higher standards.

Accredited zoos agree to undergo voluntary review by a panel of industry experts to ensure that everything from their financial security to their animal care is state of the art. These zoos and their accrediting organizations have become focused on animal well-being, recognizing that animals in their care need to thrive rather than just survive.

They also increasingly include conservation in their mission statements and contribute expertise, time and funding to supporting that effort. Accredited zoos have transformed their operations to benefit animals in their care and in the wild, while still providing the public a fun, awe-inspiring experience.

How do they achieve such lofty goals? Increasingly, they use science. Between 1993 and 2013, zoos and aquariums accredited by the Association of Zoos and Aquariums (AZA) published 5,175 peer-reviewed scientific manuscripts on a wide array of topics, including animal care and conservation.

Zoos and partner organizations conduct animal welfare research to evaluate how animals in their care see (or hear or smell) the world and what behaviors motivate them. Keepers then find innovative ways to enrich animals’ lives by creating opportunities for these skills and behaviors. For ectothermic animals like reptiles and amphibians, thermoregulation and foraging are highly-motivated behaviors, so creating opportunities for these behaviors improves well-being.

The Houston toad above, for instance, isn’t simply hand-fed a diet of bugs. Instead, the zoo simulates the same processes the toad would need to perfect in order to find food in the wild, placing bugs inside crevices and other hiding spots.

Food puzzles use that concept to give carnivores mental and physical exercise, as well as the thrill of the hunt. Zoos recognize that while achieving a goal—like getting food—is valuable to animals, so is the process of using their skills to reach that goal. As a result, zoos increasingly design environments to empower animals to make meaningful choices about what to do, when, and with whom and to enable them to exert some control over their surroundings.

While animals are already reaping the benefits of advances in research and zoo design, there’s still much we don’t know about how animals of different species perceive their environments and what they value. As research improves our understanding of animals’ perspectives, zoos will need to stay nimble and continually improve so that every animal in their care can thrive.

Zoos also conserve wildlife and wild places around the world. Zoos accredited by the AZA spent more than $200 million on field conservation initiatives in 2017, and zoos belonging to other regional accrediting organizations are also active in conservation. AZA zoos’ efforts benefitted 863 species in 128 countries, including the Houston toad.

The Houston Zoo first started breeding Houston toads to supplement the wild population in 1978. The zoo reestablished an “assurance population” in 2007; the captive colony maintained by the institution ensures that prolonged drought, wildfires, highways and development won’t result in these toads’ extinction. Today, the Houston Zoo partners with the U.S. Fish and Wildlife Service, the Texas Parks and Wildlife Department, Texas State University and the Fort Worth Zoo to breed Houston toads and restock local ponds; in 2017 alone, the Houston Zoo released 930,000 captive-bred eggs into the Houston toad’s native habitat.

These types of programs are critical to safeguarding species in the wild. Biodiversity is threatened around the globe, with amphibians in particularly acute crisis. It is imperative that zoos continue to strengthen their conservation efforts. Captive toads in the Houston Zoo’s breeding program won’t necessarily make their way back into the wild, but their kids will.