A theory of context effects based on cross-context matching