passed the tries per thread as a parameter