framework code structure refine