modify code structure