Attempt at multi-threading