cdn refactor