Contingency is used to prepare for outcomes: Implications for a functional analysis of learning