what way is bacteria and fungi important to the environment?