move window reference to iife arg