cod refactory