changed type of ThreadMatrix::threads to unsigned int