this is a sniffer code for db handler.