Implemented cpu version without switch. Still not working