Memory and control of action