here is an article on fetal brain development. worth reading for everyone that has been debating when a fetus aquires "personhood"
The human brainstem is fashioned around the 7th week of gestation and matures in a caudal to rostral arc thereby forming the medulla, pons, and midbrain. The medulla mediates arousal, breathing, heart rate, and gross movement of the body and head, and medullary functions appear prior to those of the pons which precede those of the midbrain. Hence, by the 9th gestational week the fetus will display spontaneous movements, one week later takes its first breath, and by the 25th week demonstrates stimulus-induced heart rate accelerations. As the pons, which is later to mature, mediates arousal, body movements, and vestibular and vibroacoustic perception, from around the 20th to 27th weeks the fetus responds with arousal and body movements to vibroacoustic and loud sounds delivered to the maternal abdomen. The midbrain inferior-auditory followed by the superior-visual colliculi is the last to mature, and in conjunction with the lower brainstem makes fine auditory discriminations, and reacts to sound with fetal heart rate (FHR) accelerations, head turning, and eye movements--around the 36th week. When aroused the fetus also reacts with reflexive movements, head turning, FHR accelerations, and may fall asleep and display rapid eye movements. Thus fetal-cognitive motor activity, including auditory discrimination, orienting, the wake-sleep cycle, FHRs, and defensive reactions, appear to be under the reflexive control of the brainstem which also appears capable of learning-related activity...