add threads control