Which approach emerged when William James began to study the purpose of consciousness and behavior?

Gestalt psychology
Structuralism
Behavioralism
Functionalism