rearrange code structure
rearrange code structure