Self-invoking wrapper func