introduce multi-threading for sqlite3