add multi-threading and retry-on-error