Scientists studied the ecological function of linalool in Nicotiana attenuata tobacco plants. They found the gene responsible for linalool synthesis and release which vary considerably in plants of the same species. Behavioral assays with tobacco hawkmoths in increasingly complex environments showed that the effects of linalool on the moths are quite variable, depending on the natural environment and the genetic makeup of the plant.