Nitrogen fixation in endophytic and associative symbiosis