lots of changes for the fmri version