made cpu version a bit more like gpu version