wrap the code with an IIFE. Fixes #2