Using fMRI to treat substance abuse and chronic pain