An intellectual history of psychology