A foundation for cue-triggered behavior