Added multi-threading!