Mechanisms and function of animal behaviour. (February 2017)