moved global variables for sound into the IIFE