change the way of calculate cdn