Better cpu reduction code