Changed fractionByKey to a map to enable arg check