changed scaling = (scaling_factor./(scaling_factor + Atot))