fix main class to use eventQueue