Updated the code to make the cpu max value as 8