refine directory structure