hoisting up variable definition and making setListeners arg less ambiguous