During courtship the male fly performs a genetically programmed set of behaviors to both determine if the female is receptive and to entice her to mate. The courtship activity that a male displays towards a female is affected by several factors including, the type of pheromones produced by the female as well as her response to his courtship attempts. In the example shown in this video, the female is receptive to his courtship, keeping him interested and ending with mating. If the female had not been receptive she would release less attractive pheromones and would have more aggressively discouraged the male to court her. Under these conditions, the male will quickly learn to not court females and will remember this for several hours. This ability to train males to learn and remember with courtship behavior was used to test for learning and memory defects in a fly model for familial Alzheimer's disease, by Jongens, McBride and their colleagues. In these studies, they found that with age the mutant flies lost the ability to learn and remember, and that this age onset cognitive deficit could be prevented by treating the flies with drugs, or by genetic manipulations that reduce metabotropic glutamate receptor signaling.