moved cc mode setttings to an appropriate hook