code structure refine