pass window and undefined to the IIFE