refactor(cloudfunc) addListener