var function snippet