FIX: loop on the correct variable when lookingup variable effects