thread safe guaranty + refactor