-thread array is now global
- organized thread creation on createThreads() function