Add: multi-threading (for the moment the code is not working).