Made working sniff function
Improved sniff output formatting