what is contribution of william james in psychology?