check for total cpu cores before ref