changed how the self invoking hapen