public method set listener