updated to use cdn mode