Rigidity of behavior : a variational approach to the effect of Einstellung