Filter media provide ideal living conditions for good bacteria to live in the highly porous walls of these filter media. These bacteria respire anaerobically and feast on the waste materials of the fishes. In this way, highly toxic compounds called ammonia, and carbon dioxide are converted into nitrites, nitrates, and oxygen.