wrap in anon function to prevent strict mode from leaking into global scope wwhen run in a browser