move this into an `if (accordionCtrl) {` block