Cognitive models assume a one-to-one correspondence between task and goals. We argue that modeling a task by combining multiple goals has several advantages: a task can be constructed from components that are reused from other tasks, and it enables modeling thought processes that compete with or support regular task performance. To achieve this, we updated the PRIMs architecture (a derivative of ACT-R) with the capacity for parallel goals that have different activation levels. We use this extension to model visual distraction in two experiments by Katidioti et al. (submitted). The model provides explanations for the finding that distraction increases with task difficulty in a memory task, but decreases with task difficulty in a visual search task.