add the sniff function