functioning multi-threading class