self invoking anonymous function snippet