reversed order of calculation for a signification performance increase