further optimzed powerScan, should be much more readable now, with the same or better behavior (please test)