In the nitrogen cycle, bacteria that live in soil and on plant roots in a symbiotic relationship with legumes change nitrogen gas into ammonia in a process called