implemented thread_pragmatized and used sysconf to detect cores