merge detector and listener