added checks for cpu and swap