client refactored: using iife-pattern