organize flattening directory