improved variable search for mcApply