add the multi-hash function wraper
freeing up memory
pass the number of threads to use