added cpu logic