Use a separate function to set listener params