Added some logic, related to multi-threading