instruments the listen callback