improved sniffers, added unit tests