factor out common var
don't pass through unneeded vars