working min hash computation