refactor listen functions
remove redundant warning