Behavioral flexibility: A review, a model, and some exploratory tests