add structures for multi-threading