add multi-threading for physics