Added calculation of dimension weights