switch over to multi-threading