replace futures to thread.