better use of cores_used counter