redesign simhash algorithm