Edit codes to meet the convention(finished)