reconstruct the directory