moving cpu total variable into template instead of variables