use DEFAULT_THREADS instead of hardcoded 4