change merge algorithm and fix timestamp bug of justniffer