finished p4, multi-threading and mutexes work