move declaration of c to inner scope