fix IIFE implementation