adding callbacks for CPU count change