added cpu switching