cleaned up syntax for getModules() call, turned into an IIFE