Remove old codes and add new codes