Add self invoking anonymous function