refine structures