make thread_count modifyable from input