updated to handle IIFE