How people mentally process what happened to them affects the way the brain encodes and decodes memories of what occurred