implemented l2 and binary set hamming dist