Genetic mechanisms for adapting to a changing environment.